SET SERVEROUTPUT ON SIZE 1000000;

DECLARE
		
		lv_ngo VARCHAR(5) := '&1';

		
BEGIN
						
		UPDATE
			fnd_id_flex_structures
		SET
			id_flex_structure_code	=	CAPBRIMP_MAPPING.RenameStr(SUBSTR(id_flex_structure_code,1,4),id_flex_structure_code)
		WHERE SUBSTR(ID_FLEX_STRUCTURE_CODE, 1, 4) = UPPER(lv_ngo);
				
COMMIT;
EXCEPTION
	WHEN OTHERS THEN
		dbms_output.put_line(SQLERRM);								
	


END;
/
